package cn.flant.db.hdle;

public class ExecuteParam {
	private Object[] params;
	private String sql;

	public Object[] getParams() {
		return params == null ? new Object[0] : params;
	}

	public void setParams(Object[] params) {
		this.params = params;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("{sql: ").append(sql).append(", params: [");
		if (params != null && params.length > 0) {
			for (int i = 0; i < params.length; i++) {
				Object obj = params[i];
				if (i != 0) {
					sb.append(", ");
				}
				sb.append(obj);

			}
		}
		sb.append("]}");
		return sb.toString();
	}
}
